a6e85dbac50c2cc52dda27b6d1b33601a57a2ebf,iiif-presentation-model-impl/src/main/java/de/digitalcollections/iiif/presentation/model/impl/jackson/deserializer/v2_0_0/IiifReferenceDeserializer.java,IiifReferenceDeserializer,deserialize,#JsonParser#DeserializationContext#,21

Before Change


    ObjectMapper mapper = (ObjectMapper) jp.getCodec();
    TreeNode node = mapper.readTree(jp);
    if (ObjectNode.class.isAssignableFrom(node.getClass())) {
      String id = ((TextNode) node.get("@id")).textValue();
      String type = ((TextNode) node.get("@type")).textValue();
      if ("sc:AnnotationList".equals(type)) {
        try {
          AnnotationListReference alr = new AnnotationListReferenceImpl(new URI(id));
//          alr.setWithin(within);
          result = alr;
        } catch (URISyntaxException ex) {

After Change


    TreeNode node = mapper.readTree(jp);
    String id;
    if (ObjectNode.class.isAssignableFrom(node.getClass())) {
      id = ((TextNode) node.get("@id")).textValue();
      String type = ((TextNode) node.get("@type")).textValue();
      if (!"sc:AnnotationList".equals(type)) {
        throw new IllegalArgumentException(String.format("Do not know how to handle reference type '%s'", type));